package FIT::Document::Handler::Continue;

use FIT::Class;

extends 'FIT::Document::Handler::Base';

has to => (is => 'rw', isa => 'CodeRef');

sub handle {
    my ($fixture, $element, @handlers) = @_;
    $self->to->($fixture, $element);
    $self->run_next_handler(@_);
}


=head1 NAME

FIT::Document::Handler::Continue - wrap a code ref with a handler


=head1 DESCRIPTION

At the start of handler processing, this handler will always be the last
handler in the chain, and will contain a code ref which will continue
default fixture processing.

After running the C< to() > code ref, we continue with handler processing.

=cut

